package com.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/hello")
public class HelloController {

	@RequestMapping(value = "/printHello", method = RequestMethod.GET)
	public ModelAndView printHello(ModelMap model) {
		ModelAndView mv = new ModelAndView();
		mv.addObject("message", "Hello Spring MVC Framework!");
		mv.setViewName("index");
		System.out.println("11111");
		return mv;
	}

}
